//
//  ZCBaseRequest.m
//  Sodom
//
//  Created by 赵隆杰 on 2019/12/8.
//  Copyright © 2019 赵隆杰. All rights reserved.
//

#import "ZCBaseRequest.h"

@implementation ZCBaseRequest

-(id)init
{
    self=[super init];
    if (self) {
        if (self.cacheTimeType == 0) {
            self.cacheTimeType=kZorasunRequestCacheTimeTypeNone;
        }
    }
    return self;
}
-(BOOL)success
{
    return NO;
}
-(NSString * )msg
{
    return nil;
}
-(id)res
{
    return nil;
}
-(id)result
{
    return nil;
}
#pragma mark 缓存时间，二次请求的时候不真的发起请求 ,如果需要其他缓存时间的请求，进行覆盖
-(NSInteger)cacheTimeInSeconds
{
    NSInteger seconds=0;
    switch (_cacheTimeType) {
        case kZorasunRequestCacheTimeTypeLong:
            seconds=60*5;
            break;
        case kZorasunRequestCacheTimeTypeShort:
            seconds= 60*1;
            break;
        case kZorasunRequestCacheTimeTypeNone:
        default:
            break;
    }
    return seconds;
}

//- (YTKRequestSerializerType)requestSerializerType
//{
//    return YTKRequestSerializerTypeJSON;
//}

/////  Response serializer type. See also `responseObject`.
//- (YTKResponseSerializerType)responseSerializerType
//{
//    return YTKResponseSerializerTypeHTTP;
//}


@end
